﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Tree.Configuration
{
    public class ContainerElement : ConfigurationElement
    {
        public ContainerElement()
        {
        }

        [ConfigurationProperty("state", IsDefaultCollection = false, IsRequired = false)]
        [ConfigurationCollection(typeof(ConfigurationState),
            AddItemName = "add",
            ClearItemsName = "clear",
            RemoveItemName = "remove")]
        public ConfigurationState ElementStateCollection
        {
            get
            {
                ConfigurationState state =
                    (ConfigurationState)base["state"];
                return state;
            }
        }

        [ConfigurationProperty("type")]
        public string Type
        {
            get
            {
                return (string)this["type"];
            }
            set
            {
                this["type"] = value;
            }
        }

        [ConfigurationProperty("impl")]
        public string Impl
        {
            get
            {
                return (string)this["impl"];
            }
            set
            {
                this["impl"] = value;
            }
        }
    }
}
